package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatDete;
import com.indusfo.spc.pojo.MatFlow;
import com.indusfo.spc.pojo.MatStation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/22 17:42
 * @Version 1.0
 */

public interface MatDeteMapper {

    /**
     * 新增
     */
    int insertMatDete(MatDete matDete);

    /**
     * 修改
     */
    int updateMatDete(MatDete matDete);

    /**
     * 查询
     */
    List<MatDete> queryMatDete(MatDete matDete);

    /**
     * 总数
     */
    int countMatDete(MatDete matDete);

    /**
     * 判重
     */
    int checkMatDete(MatDete matDete);

    /**
     * 启停
     */
    int deleteMatDete(@Param("matDeteIds") List<Integer> matDeteIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<MatDete> queryMatDeteByMatFlowId(@Param("matFlowId") Integer matFlowId);

    /**
     * 级联删除
     */
    int deleteMatDeteByMatDeteId(@Param("matDeteId") Integer matDeteId, @Param("dataState") Integer dataState);

    List<MatDete> queryMatDeteByMatFlowList(@Param("matFlowList") List<MatFlow> matFlowList);
}